<%@ page import ="java.sql.*,java.io.*" %>
<%


    String user = request.getParameter("uname");    
    String pwd = request.getParameter("pass");
    String fname = request.getParameter("fname");
    String lname = request.getParameter("lname");
    String email = request.getParameter("email");
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","system","tiger");
    Statement stm=conn.createStatement();
    int i=stm.executeUpdate("insert into members(id,first_name, last_name, email, uname, pass,regdate) values (mem2.nextval,'" + fname + "','" + lname + "','" + email + "','" + user + "','" + pwd + "',CURRENT_DATE)");
    if (i > 0) {
        //session.setAttribute("userid", user);
        response.sendRedirect("welcome.jsp");
       // out.print("Registration Successfull!"+"<a href='index.jsp'>Go to Login</a>");
    } else {
        response.sendRedirect("index.jsp");
    }
%>
